package com.wang.test.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
//@Table(name = "user")//对应到表名字
@Builder
public class User1 implements Serializable {

    //@Id//对应表的主键

    private Integer id;//必须用包装类,不然插入不到数据库中

    //@Column(name = "Name")//解决实体类和数据库字段不一致问题

    private String name;


    private Integer age;

    private Integer state;

    private List<Student> students;
}
